﻿//-----------------------------------------------------------------------
// <copyright file="StringCaseConverter.cs" company="In The Hand Ltd">
//     Copyright © 2014-15 In The Hand Ltd. All rights reserved.
// </copyright>
//-----------------------------------------------------------------------

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
#if !WINDOWS_PHONE
using Windows.UI.Xaml.Data;
#else
#if WINDOWS_PHONE_APP
using InTheHand.ApplicationModel;
#endif
using System.Windows.Data;
#endif
using Windows.ApplicationModel;

namespace InTheHand.UI.Converters
{
    internal sealed class StringCaseConverter : IValueConverter
    {
#if !WINDOWS_PHONE
        public object Convert(object value, Type targetType, object parameter, string culture)
#else
        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
#endif
        {
            if(value is string)
            {
                return value.ToString().ToUpper();
            }

            return null;
        }

#if !WINDOWS_PHONE
        public object ConvertBack(object value, Type targetType, object parameter, string culture)
#else
        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
#endif
        {
            throw new NotImplementedException();
        }
    }
}
